﻿using Prism.Mvvm;
using System.ComponentModel.DataAnnotations;

namespace PLCSharp.Views.Authority
{


    public class User : BindableBase
    {
        public User() { }
        public User(string name, string password, Authority authority)
        {

            Name = name;
            Password = password;
            Authority = authority;
        }


        private string _Name;
        [Key]
        public string Name
        {
            get { return _Name; }
            set { SetProperty(ref _Name, value); }
        }
        public string Password { get; set; }

        private Authority _Authority;
        public Authority Authority
        {
            get { return _Authority; }
            set { SetProperty(ref _Authority, value); }
        }

        public override string ToString()
        {
            return $"{Name}";
        }
    }
}